package com.ld.security.common.tomcat.runner;

import com.ld.security.common.shiro.util.AppUtil;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Log
@Component
@Order(0)
public class AppRunner implements CommandLineRunner {

    @Value("${spring.application.name}")
    private String appName ;

    @Override
    public void run(String... args) throws Exception {
        AppUtil.setAppName(appName);
    }
}
